package  
{
	import avmplus.DescribeTypeJSON;
	import code.CheckClass;
	import flash.automation.KeyboardAutomationAction;
	import flash.display.AVM1Movie;
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.BitmapDataChannel;
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	import flash.display.Graphics;
	import flash.display.GraphicsBitmapFill;
	import flash.display.GraphicsEndFill;
	import flash.display.GraphicsPath;
	import flash.display.GraphicsStroke;
	import flash.display.InteractiveObject;
	import flash.display.InterpolationMethod;
	import flash.display.Loader;
	import flash.display.LoaderInfo;
	import flash.display.MovieClip;
	import flash.display.NativeMenu;
	import flash.display.NativeMenuItem;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.display.Stage3D;
	import flash.display.StageAlign;
	import flash.display.StageDisplayState;
	import flash.display.StageQuality;
	import flash.events.Event;
	import flash.events.HTTPStatusEvent;
	import flash.events.KeyboardEvent;
	import flash.events.MouseEvent;
	import flash.events.TimerEvent;
	import flash.filters.BitmapFilter;
	import flash.filters.ColorMatrixFilter;
	import flash.filters.GlowFilter;
	import flash.geom.ColorTransform;
	import flash.geom.Vector3D;
	import flash.media.SoundLoaderContext;
	import flash.net.SharedObjectFlushStatus;
	import flash.net.URLLoader;
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequest;
	import flash.net.URLStream;
	import flash.net.URLVariables;
	import flash.text.engine.ElementFormat;
	import flash.text.engine.FontDescription;
	import flash.text.engine.FontLookup;
	import flash.text.engine.FontMetrics;
	import flash.text.engine.FontPosture;
	import flash.text.engine.FontWeight;
	import flash.text.Font;
	import flash.text.FontStyle;
	import flash.text.FontType;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.ui.Keyboard;
	import flash.ui.KeyLocation;
	import flash.ui.Mouse;
	import flash.ui.MouseCursor;
	import flash.utils.describeType;
	import flash.utils.Dictionary;
	import flash.utils.getTimer;
	import mx.core.FontAsset;
	import mx.core.MovieClipAsset;
	import org.superkaka.kakalib.optimization.BitmapMovie;
	import org.superkaka.kakalib.struct.BitmapFrameInfo;
	import xxl.ioc.dependencyproviders.ValueProvider;
	import xxl.ioc.reflection.DescribeTypeJSONReflector;
	import xxl.ioc.reflection.DescribeTypeReflector;
	import xxl.ioc.reflection.IReflector;
	import xxl.ioc.typedescriptions.TypeDescription;
	import xxl.signals.base.natives.NativeMappedSignal;
	import xxl.signals.base.natives.NativeRelaySignal;
	import xxl.signals.base.natives.NativeSignal;
	import xxl.signals.base.natives.sets.NativeSignalSet;
	
	/**
	 * ...
	 * @author XXL
	 */
	public class Main5 extends Sprite 
	{
		private var txt:TextField;
		
		public function Main5() 
		{
			txt = new TextField();
			txt.autoSize = TextFieldAutoSize.LEFT;
			txt.width = stage.stageWidth;
			txt.multiline = txt.wordWrap = true;
			addChild(txt);
			txt.filters = [new GlowFilter(0xFFFFFF)];
			txt.text = "aaa";
			
			addEventListener(MouseEvent.CLICK, clickHandler);
		}
		
		private function clickHandler(e:MouseEvent):void 
		{
			var arr:Array = [];
			arr.push(AVM1Movie);
			arr.push(BitmapMovie);
			arr.push(Bitmap);
			arr.push(BitmapData);
			arr.push(BitmapDataChannel);
			arr.push(BitmapFilter);
			arr.push(BitmapFrameInfo);
			arr.push(ColorMatrixFilter);
			arr.push(ColorTransform);
			arr.push(DisplayObject);
			arr.push(DisplayObjectContainer);
			arr.push(Dictionary);
			arr.push(Date);
			arr.push(DescribeTypeJSONReflector);
			arr.push(DescribeTypeReflector);
			arr.push(Event);
			arr.push(ElementFormat);
			arr.push(EvalError);
			arr.push(FontDescription);
			arr.push(FontLookup);
			arr.push(FontMetrics);
			arr.push(FontPosture);
			arr.push(Font);
			arr.push(FontWeight);
			arr.push(FontStyle);
			arr.push(FontType);
			arr.push(FontAsset);
			arr.push(Graphics);
			arr.push(GraphicsBitmapFill);
			arr.push(GraphicsEndFill);
			arr.push(GraphicsPath);
			arr.push(GraphicsStroke);
			arr.push(HTTPStatusEvent);
			arr.push(InteractiveObject);
			arr.push(InterpolationMethod);
			arr.push(KeyboardAutomationAction);
			arr.push(KeyboardEvent);
			arr.push(Keyboard);
			arr.push(KeyLocation);
			arr.push(LoaderInfo);
			arr.push(Loader);
			arr.push(MouseEvent);
			arr.push(MovieClip);
			arr.push(MovieClipAsset);
			arr.push(Mouse);
			arr.push(MouseCursor);
			arr.push(Math);
			arr.push(NativeMenu);
			arr.push(NativeMenuItem);
			arr.push(NativeSignal);
			arr.push(NativeSignalSet);
			arr.push(NativeMappedSignal);
			arr.push(NativeRelaySignal);
			arr.push(SoundLoaderContext);
			arr.push(SharedObjectFlushStatus);
			arr.push(Sprite);
			arr.push(Shape);
			arr.push(Stage);
			arr.push(Stage3D);
			arr.push(StageDisplayState);
			arr.push(StageAlign);
			arr.push(StageQuality);
			arr.push(TimerEvent);
			arr.push(TypeDescription);
			arr.push(URLLoader);
			arr.push(URLLoaderDataFormat);
			arr.push(URLRequest);
			arr.push(URLStream);
			arr.push(URLVariables);
			arr.push(Vector3D);
			arr.push(ValueProvider);
			arr.push(Walker);
			
			var REPS:int = 100;
			var len:int = arr.length;
			var i:int;
			var k:int;
			var time:int;
			var str:String = "";
			var xml:XML;
			var obj:Object;
			var j:DescribeTypeJSON = new DescribeTypeJSON();
			time = getTimer();
			for (k = 0; k < REPS; k++)
			{
				for (i = 0; i < len; i++)
				{
					//xml = describeType(arr[i]);
					obj = j.getClassDescription(arr[i]);
				}
			}
			str = "REPS:" + REPS + " class "+ len + ":" + (getTimer() - time).toString();
			txt.text = str;
		}
		
	}

}